package bancosys.tec.persist.entities.domain;

import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import jmine.tec.persist.annotation.Alias;
import jmine.tec.persist.annotation.Comment;
import jmine.tec.persist.annotation.Comments;
import jmine.tec.persist.annotation.Constraint;
import jmine.tec.persist.annotation.DiscriminatorComment;
import bancosys.tec.persist.bussobj.AuthPersistableBusinessObject;

@Entity
@Table(name = "WRONG_SINGLE_TABLE")
@Alias("WRONG")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "DISCRIMINATOR", discriminatorType = DiscriminatorType.STRING)
@DiscriminatorValue(value = "0")
@DiscriminatorComment("WRONG SINGLE")
@Constraint(suffix = "5")
@Comments({ @Comment(table = "WRONG_SINGLE_TABLE", value = "NENHUM COMENTARIO"),
        @Comment(table = "WRONG_SINGLE_TABLE", column = "DISCRIMINATOR", value = "NENHUM COMENTARIO") })
@SequenceGenerator(name = "SEQ_WRONG", sequenceName = "SEQ_WRONG", initialValue = 100)
public class WrongSingleTableEntity extends AuthPersistableBusinessObject {

    private Long id;

    private String nome;

    @Id
    @Column(name = "COD_WRONG")
    @Comment(table = "WRONG_SINGLE_TABLE", column = "COD_WRONG", value = "NENHUM COMENTARIO.")
    @GeneratedValue(generator = "SEQ_WRONG", strategy = GenerationType.AUTO)
    public Long getId() {
        return this.id;
    }

    /**
     * @return the nome
     */
    @Column(name = "NOME")
    @Comment(table = "WRONG_SINGLE_TABLE", column = "NOME", value = "NENHUM COMENTARIO.")
    public String getNome() {
        return this.nome;
    }

    /**
     * @param nome the nome to set
     */
    public void setNome(String nome) {
        this.nome = nome;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

}
